<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div class="box">
		  <div  id="d1">李帅</div>
		  <input type="button"  value="抽奖"  id="luckyBtn"  />
			
		 </div>
		  <script>
		     var names = ["李帅", "种庆", "陈宇", "代茹楠", "杨瑞成", "杨淮庆", "刘警东",
		      "刘慧慧", "林伟伟", "孙成威", "吕刘义", "应青苗", "郑婷婷", "李子迪", "张焱华",
		      "杨文豪", "王国庆", "王强强", "刘珍珍", "陈龙"];
		      var i=0;
		      function  f(){
		          if(i==names.length-1){
		              i=-1;
		          }
		          d1.innerHTML=names[++i];
		            }
		    luckyBtn.onclick=function(){
		        if(this.value!="暂停"){
		         timer= setInterval(f,1000);
		            this.value="暂停";
		          
		        }else{
		            clearInterval(timer);
		            this.value="开始 ";
		   }
		 }
		   
		</script>
	</body>
</html>
